﻿project(Editor)

find_package(Qt6 REQUIRED COMPONENTS Widgets OpenGL Qml Quick)

file(GLOB build_files_cpp CONFIGURE_DEPENDS "${CMAKE_CURRENT_LIST_DIR}/inc/*.*")
file(GLOB build_files_h CONFIGURE_DEPENDS "${CMAKE_CURRENT_LIST_DIR}/src/*.*")
file(GLOB build_files_ui CONFIGURE_DEPENDS "${CMAKE_CURRENT_LIST_DIR}/ui/*.*")

set(resource_file "${CMAKE_CURRENT_LIST_DIR}/res/default_theme.qrc" "${CMAKE_CURRENT_LIST_DIR}/views.qrc")

add_executable (PrimaryEditor ${build_files_cpp} ${build_files_h} ${build_files_ui} ${resource_file})

target_link_libraries(PrimaryEditor PRIVATE Qt6::Quick Qt6::Widgets Qt6::OpenGL Qt6::Qml Ws2_32)

target_include_directories(PrimaryEditor PRIVATE "${CMAKE_CURRENT_LIST_DIR}/inc" "${CMAKE_CURRENT_LIST_DIR}")

set_target_properties(PrimaryEditor PROPERTIES
    AUTOMOC ON
    AUTOUIC ON
    AUTORCC ON
)

